---
layout: page
title: 首页
css: [common.css,page.css]
js: [blog.js]
---
<div class="page page-index animation-fade-up">
	{% for post in site.posts  %}
		{% capture post_year %}{{ post.date | date: "%Y" }}{% endcapture %}
		{% capture post_previous_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
		{% capture post_next_year %}{{ post.next.date | date: "%Y" }}{% endcapture %}

		{% if forloop.first or post_next_year != post_year %}
		<div class="list-post"><h2 id="{{post_year}}">{{post_year}}</h2><ul>
		{% endif %}

		<li>
			<span class="date">{{ post.date | date: "%Y/%m/%d" }}</span>
			<a href="{{ site.baseurl | append: post.url }}" class="title hover-underline">{{ post.title }}</a>
			{% for categorie in post.categories %}
			<a href="{{site.baseurl}}/pages/categories.html#{{ categorie }}" class="category hover-underline">{{ categorie }}</a>
			{% endfor %}
		</li>
		
		{% if forloop.last or post_previous_year != post_year %}
		</ul></div>
		{% endif %}
	{% endfor %}
</div>